package com.yzy.util;


public enum SerialTypeEnum {
    /**
     * @date 2022/7/1 12:08
     * 用户工号
    */
    ACCOUNT(0, "AC"),
    /**
     * 项目编号
     */
    PROJECT(1, "XM"),
    /**
     * 材料编号
     */
    MATERIAL(2, "MA"),
    /**
     * 客户端编号
     */
    CLIENTNO(3, "CN"),
    /**
     * 客户端编号
     */
    VEHICLETRIPS(4, "VT"),
    ;

    private int value;

    /**
     * 
     * @date 2022/7/1 12:09
     *  简写
    */
    private String shorthand;

    SerialTypeEnum(int value, String shorthand) {
        this.value = value;
        this.shorthand = shorthand;
    }

    public int getValue() {
        return value;
    }

    public String getShorthand() {
        return shorthand;
    }

    public static String getShorthandByValue(int value) {
        for (SerialTypeEnum enums : SerialTypeEnum.values()) {
            if (enums.getValue() == value) {
                return enums.getShorthand();
            }
        }
        return "";
    }
}